﻿Imports Microsoft.VisualBasic.MyServices
Public Class Actor
    Inherits SFML.Graphics.Sprite
    Dim Images(4) As String
    Dim currentImageNum As Byte = 0
    Public Sub AnimateList(ByVal ImagePath As String, ByVal Files As Byte)
        ReDim Images(Files)

        For i As Integer = 0 To Files
            Images(i) = ImagePath.Replace(0, i)
        Next
        'Animate()
    End Sub
    Private Sub Animate()
        Me.Image = New SFML.Graphics.Image(Images(currentImageNum))
        currentImageNum += 1
        If currentImageNum = Images.Length Then
            currentImageNum = 0
        End If
    End Sub
    Public Sub Move(ByVal x As Integer, ByVal y As Integer)
        Dim _x As Single = Me.Position.X + x
        Dim _y As Single = Me.Position.Y + y
        Me.Position = New SFML.Graphics.Vector2(_x, _y)
        Animate()
    End Sub

End Class
